fix(bridge): align schema limits with evidence validation - #281
Merged
Conversation
roborev: Combined Review (
|
Bridge callers could reject valid polygon outlines or submit scalar values that Docbank would immediately reject. Express the field bounds in the published schema and describe the aggregate and UTF-8 byte limits that still require Go validation. Exercise the changed boundaries against the validator so future limit changes expose drift. The cleanup retry test imposed a one-second completion budget on real disk operations. Give background work time to finish, inspect its terminal state, and join it before closing the test vault. The synchronous test continues to verify the persisted retry state. Generated with Codex Co-authored-by: Codex <codex@users.noreply.github.com>
roborev: Combined Review (
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The published bridge schema now matches the Go validator's limits on heading depth, geometry counts, and scalar bounds, so a provider that validates its evidence against the schema gets the same answer Docbank will. A 20,000-point polygon is accepted, and zero-sized frames or over-limit values are refused by the schema itself. The schema used to allow wider numbers than the validator, so a provider could build payloads Docbank then rejected.
A few limits still need Go validation, so the schema states them plainly: 100,000 total polygon points per geometry, a 1 MiB heading budget, and UTF-8 byte limits, since JSON Schema counts code points, not bytes.
Closes #266